package com.ellecity06.cwhiskymall.view.dialog

import android.view.LayoutInflater
import android.view.View
import androidx.fragment.app.FragmentActivity
import com.ellecity06.common.base.BaseDialog
import com.ellecity06.cwhiskymall.R
import com.ellecity06.cwhiskymall.databinding.DialogImageTipBinding

/**
 * @author ellecity06
 * @time 2024/11/7 17:03
 * @des
 */
class ImageTipsDialog(activity: FragmentActivity) : BaseDialog<DialogImageTipBinding>(activity),
    View.OnClickListener {
    override val widthP: Float
        get() = 0.82F
    override val animation: Int
        get() = R.style.animScaleCenter
    override fun inflaterViewBinding(): DialogImageTipBinding {
        return DialogImageTipBinding.inflate(LayoutInflater.from(context))
    }

    override fun initialize() {
        binding.viewClose.setOnClickListener(this)
        binding.tvConfirm.setOnClickListener(this)
    }

    override fun onClick(view: View?) {
        when (view?.id) {
            binding.viewClose.id -> {
                dismiss()

            }
            binding.tvConfirm.id -> {
                dismiss()

            }
        }
    }
}